/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.stat;

import android.text.TextUtils;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.Vector;
import org.json.JSONArray;
import org.json.JSONObject;

public class j {
    private static String h = "HistoryBean";
    public Vector a = null;
    public Map b = null;
    public Map c = null;
    public Map d = null;
    public Map e = null;
    public Map f = null;
    public Map g = null;

    public void a() {
        if (this.a != null) {
            localObject = null;
            for (int i = 0; i < this.a.size(); ++i) {
                localObject = ((n) this.a.get(i)).d;
                ((Vector) localObject).clear();
                localObject = null;
            }
            this.a.clear();
            this.a = null;
        }
        Map.Entry localEntry;
        if (this.b != null) {
            localObject = this.b.entrySet().iterator();
            for (localVector = null; ((Iterator) localObject).hasNext(); localVector = null) {
                localEntry = (Map.Entry) ((Iterator) localObject).next();
                localVector = (Vector) localEntry.getValue();
                localVector.clear();
            }
            this.b.clear();
            this.b = null;
        }
        if (this.c != null) {
            localObject = this.c.entrySet().iterator();
            for (localVector = null; ((Iterator) localObject).hasNext(); localVector = null) {
                localEntry = (Map.Entry) ((Iterator) localObject).next();
                localVector = (Vector) localEntry.getValue();
                Map localMap = null;
                for (int j = 0; j < localVector.size(); ++j) {
                    localMap = ((i) localVector.get(j)).g;
                    if (localMap == null)
                        continue;
                    localMap.clear();
                    localMap = null;
                }
                localVector.clear();
            }
            this.c.clear();
            this.c = null;
        }
        if (this.d != null) {
            localObject = this.d.entrySet().iterator();
            for (localVector = null; ((Iterator) localObject).hasNext(); localVector = null) {
                localEntry = (Map.Entry) ((Iterator) localObject).next();
                localVector = (Vector) localEntry.getValue();
                localVector.clear();
            }
            this.d.clear();
            this.d = null;
        }
        if (this.e != null) {
            localObject = this.e.entrySet().iterator();
            for (localVector = null; ((Iterator) localObject).hasNext(); localVector = null) {
                localEntry = (Map.Entry) ((Iterator) localObject).next();
                localVector = (Vector) localEntry.getValue();
                localVector.clear();
            }
            this.e.clear();
            this.e = null;
        }
        if (this.f != null) {
            localObject = this.f.entrySet().iterator();
            for (localVector = null; ((Iterator) localObject).hasNext(); localVector = null) {
                localEntry = (Map.Entry) ((Iterator) localObject).next();
                localVector = (Vector) localEntry.getValue();
                localVector.clear();
            }
            this.f.clear();
            this.f = null;
        }
        if (this.g == null)
            return;
        Object localObject = this.g.entrySet().iterator();
        for (Vector localVector = null; ((Iterator) localObject).hasNext(); localVector = null) {
            localEntry = (Map.Entry) ((Iterator) localObject).next();
            localVector = (Vector) localEntry.getValue();
            localVector.clear();
        }
        this.g.clear();
        this.g = null;
    }

    public void a(String paramString) {
        try {
            if (TextUtils.isEmpty(paramString))
                return;
            JSONObject localJSONObject = new JSONObject(paramString);
            Object localObject5;
            Object localObject6;
            if (!(localJSONObject.isNull("terminate"))) {
                localObject1 = localJSONObject.getJSONArray("terminate");
                if (localObject1 != null) {
                    localObject2 = null;
                    localObject3 = null;
                    for (int i = 0; i < ((JSONArray) localObject1).length(); ++i) {
                        localObject2 = (JSONObject) ((JSONArray) localObject1).opt(i);
                        localObject3 = new n();
                        if (!(((JSONObject) localObject2).isNull("session")))
                            ((n) localObject3).a = ((JSONObject) localObject2).getString("session");
                        if (!(((JSONObject) localObject2).isNull("createTime")))
                            ((n) localObject3).b = ((JSONObject) localObject2).getLong("createTime");
                        if (!(((JSONObject) localObject2).isNull("terminateTime")))
                            ((n) localObject3).c = ((JSONObject) localObject2).getLong("terminateTime");
                        if (!(((JSONObject) localObject2).isNull("uptr")))
                            ((n) localObject3).e = ((JSONObject) localObject2).getLong("uptr");
                        if (!(((JSONObject) localObject2).isNull("dntr")))
                            ((n) localObject3).f = ((JSONObject) localObject2).getLong("dntr");
                        if (!(((JSONObject) localObject2).isNull("activity"))) {
                            localObject4 = ((JSONObject) localObject2).getJSONObject("activity");
                            localObject5 = ((JSONObject) localObject4).keys();
                            localObject6 = "";
                            while (((Iterator) localObject5).hasNext()) {
                                localObject6 = (String) ((Iterator) localObject5).next();
                                if (((n) localObject3).d == null)
                                    ((n) localObject3).d = new Vector();
                                ((n) localObject3).d.add(new g((String) localObject6, 0L, 0L,
                                        ((JSONObject) localObject4).getInt((String) localObject6)));
                            }
                        }
                        this.a.add(localObject3);
                    }
                }
            }
            int j;
            if (!(localJSONObject.isNull("pay"))) {
                localObject1 = localJSONObject.getJSONObject("pay");
                localObject2 = "";
                localObject3 = null;
                localVector = null;
                localObject4 = ((JSONObject) localObject1).keys();
                while (((Iterator) localObject4).hasNext()) {
                    localObject2 = (String) ((Iterator) localObject4).next();
                    localObject3 = ((JSONObject) localObject1).getJSONArray((String) localObject2);
                    if (localObject3 == null)
                        continue;
                    localObject5 = null;
                    localObject6 = null;
                    localVector = new Vector();
                    for (j = 0; j < ((JSONArray) localObject3).length(); ++j) {
                        localObject5 = (JSONObject) ((JSONArray) localObject3).opt(j);
                        localObject6 = new l();
                        if (!(((JSONObject) localObject5).isNull("cash")))
                            ((l) localObject6).a = ((JSONObject) localObject5).getInt("cash");
                        if (!(((JSONObject) localObject5).isNull("coin")))
                            ((l) localObject6).c = ((JSONObject) localObject5).getInt("coin");
                        if (!(((JSONObject) localObject5).isNull("props")))
                            ((l) localObject6).d = ((JSONObject) localObject5).getString("props");
                        if (!(((JSONObject) localObject5).isNull("number")))
                            ((l) localObject6).e = ((JSONObject) localObject5).getInt("number");
                        if (!(((JSONObject) localObject5).isNull("source")))
                            ((l) localObject6).f = ((JSONObject) localObject5).getInt("source");
                        if (!(((JSONObject) localObject5).isNull("level")))
                            ((l) localObject6).g = ((JSONObject) localObject5).getString("level");
                        if (!(((JSONObject) localObject5).isNull("rank")))
                            ((l) localObject6).h = ((JSONObject) localObject5).getString("rank");
                        if (!(((JSONObject) localObject5).isNull("ts")))
                            ((l) localObject6).i = ((JSONObject) localObject5).getLong("ts");
                        localVector.add(localObject6);
                    }
                    this.b.put(localObject2, localVector);
                }
            }
            if (!(localJSONObject.isNull("event"))) {
                localObject1 = localJSONObject.getJSONObject("event");
                localObject2 = "";
                localObject3 = null;
                localVector = null;
                localObject4 = ((JSONObject) localObject1).keys();
                while (((Iterator) localObject4).hasNext()) {
                    localObject2 = (String) ((Iterator) localObject4).next();
                    localObject3 = ((JSONObject) localObject1).getJSONArray((String) localObject2);
                    if (localObject3 == null)
                        continue;
                    localObject5 = null;
                    localObject6 = null;
                    localVector = new Vector();
                    for (j = 0; j < ((JSONArray) localObject3).length(); ++j) {
                        localObject5 = (JSONObject) ((JSONArray) localObject3).opt(j);
                        localObject6 = new i();
                        Iterator localIterator = ((JSONObject) localObject5).keys();
                        String str = "";
                        while (localIterator.hasNext()) {
                            str = (String) localIterator.next();
                            if ("qhId".equals(str)) {
                                ((i) localObject6).a = ((JSONObject) localObject5).getString(str);
                            }
                            else if ("qhTs".equals(str)) {
                                ((i) localObject6).b = ((JSONObject) localObject5).getLong(str);
                            }
                            else if ("qhBegin".equals(str)) {
                                ((i) localObject6).d = ((JSONObject) localObject5).getLong(str);
                            }
                            else if ("qhEnd".equals(str)) {
                                ((i) localObject6).e = ((JSONObject) localObject5).getLong(str);
                            }
                            else if ("qhDuration".equals(str)) {
                                ((i) localObject6).f = ((JSONObject) localObject5).getLong(str);
                            }
                            else {
                                if (((i) localObject6).g == null)
                                    ((i) localObject6).g = new HashMap();
                                ((i) localObject6).g.put(str, ((JSONObject) localObject5).getString(str));
                            }
                        }
                        localVector.add(localObject6);
                    }
                    this.c.put(localObject2, localVector);
                }
            }
            if (!(localJSONObject.isNull("level"))) {
                localObject1 = localJSONObject.getJSONObject("level");
                localObject2 = "";
                localObject3 = null;
                localVector = null;
                localObject4 = ((JSONObject) localObject1).keys();
                while (((Iterator) localObject4).hasNext()) {
                    localObject2 = (String) ((Iterator) localObject4).next();
                    localObject3 = ((JSONObject) localObject1).getJSONArray((String) localObject2);
                    if (localObject3 == null)
                        continue;
                    localObject5 = null;
                    localObject6 = null;
                    localVector = new Vector();
                    for (j = 0; j < ((JSONArray) localObject3).length(); ++j) {
                        localObject5 = (JSONObject) ((JSONArray) localObject3).opt(j);
                        localObject6 = new k();
                        if (!(((JSONObject) localObject5).isNull("name")))
                            ((k) localObject6).a = ((JSONObject) localObject5).getString("name");
                        if (!(((JSONObject) localObject5).isNull("begin")))
                            ((k) localObject6).b = ((JSONObject) localObject5).getLong("begin");
                        if (!(((JSONObject) localObject5).isNull("end")))
                            ((k) localObject6).c = ((JSONObject) localObject5).getLong("end");
                        if (!(((JSONObject) localObject5).isNull("duration")))
                            ((k) localObject6).d = ((JSONObject) localObject5).getLong("duration");
                        if (!(((JSONObject) localObject5).isNull("status")))
                            ((k) localObject6).e = ((JSONObject) localObject5).getInt("status");
                        if (!(((JSONObject) localObject5).isNull("reason")))
                            ((k) localObject6).f = ((JSONObject) localObject5).getString("reason");
                        localVector.add(localObject6);
                    }
                    this.d.put(localObject2, localVector);
                }
            }
            if (!(localJSONObject.isNull("task"))) {
                localObject1 = localJSONObject.getJSONObject("task");
                localObject2 = "";
                localObject3 = null;
                localVector = null;
                localObject4 = ((JSONObject) localObject1).keys();
                while (((Iterator) localObject4).hasNext()) {
                    localObject2 = (String) ((Iterator) localObject4).next();
                    localObject3 = ((JSONObject) localObject1).getJSONArray((String) localObject2);
                    if (localObject3 == null)
                        continue;
                    localObject5 = null;
                    localObject6 = null;
                    localVector = new Vector();
                    for (j = 0; j < ((JSONArray) localObject3).length(); ++j) {
                        localObject5 = (JSONObject) ((JSONArray) localObject3).opt(j);
                        localObject6 = new o();
                        if (!(((JSONObject) localObject5).isNull("name")))
                            ((o) localObject6).a = ((JSONObject) localObject5).getString("name");
                        if (!(((JSONObject) localObject5).isNull("begin")))
                            ((o) localObject6).e = ((JSONObject) localObject5).getLong("begin");
                        if (!(((JSONObject) localObject5).isNull("end")))
                            ((o) localObject6).f = ((JSONObject) localObject5).getLong("end");
                        if (!(((JSONObject) localObject5).isNull("duration")))
                            ((o) localObject6).g = ((JSONObject) localObject5).getLong("duration");
                        if (!(((JSONObject) localObject5).isNull("status")))
                            ((o) localObject6).d = ((JSONObject) localObject5).getInt("status");
                        if (!(((JSONObject) localObject5).isNull("type")))
                            ((o) localObject6).b = ((JSONObject) localObject5).getString("type");
                        if (!(((JSONObject) localObject5).isNull("reason")))
                            ((o) localObject6).c = ((JSONObject) localObject5).getString("reason");
                        localVector.add(localObject6);
                    }
                    this.e.put(localObject2, localVector);
                }
            }
            if (!(localJSONObject.isNull("buy"))) {
                localObject1 = localJSONObject.getJSONObject("buy");
                localObject2 = "";
                localObject3 = null;
                localVector = null;
                localObject4 = ((JSONObject) localObject1).keys();
                while (((Iterator) localObject4).hasNext()) {
                    localObject2 = (String) ((Iterator) localObject4).next();
                    localObject3 = ((JSONObject) localObject1).getJSONArray((String) localObject2);
                    if (localObject3 == null)
                        continue;
                    localObject5 = null;
                    localObject6 = null;
                    localVector = new Vector();
                    for (j = 0; j < ((JSONArray) localObject3).length(); ++j) {
                        localObject5 = (JSONObject) ((JSONArray) localObject3).opt(j);
                        localObject6 = new h();
                        if (!(((JSONObject) localObject5).isNull("name")))
                            ((h) localObject6).a = ((JSONObject) localObject5).getString("name");
                        if (!(((JSONObject) localObject5).isNull("type")))
                            ((h) localObject6).b = ((JSONObject) localObject5).getString("type");
                        if (!(((JSONObject) localObject5).isNull("number")))
                            ((h) localObject6).c = ((JSONObject) localObject5).getInt("number");
                        if (!(((JSONObject) localObject5).isNull("coin")))
                            ((h) localObject6).f = ((JSONObject) localObject5).getInt("coin");
                        if (!(((JSONObject) localObject5).isNull("coinType")))
                            ((h) localObject6).e = ((JSONObject) localObject5).getString("coinType");
                        if (!(((JSONObject) localObject5).isNull("method")))
                            ((h) localObject6).d = ((JSONObject) localObject5).getString("method");
                        if (!(((JSONObject) localObject5).isNull("ts")))
                            ((h) localObject6).g = ((JSONObject) localObject5).getLong("ts");
                        if (!(((JSONObject) localObject5).isNull("level")))
                            ((h) localObject6).h = ((JSONObject) localObject5).getString("level");
                        localVector.add(localObject6);
                    }
                    this.f.put(localObject2, localVector);
                }
            }
            if (localJSONObject.isNull("use"))
                return;
            Object localObject1 = localJSONObject.getJSONObject("use");
            Object localObject2 = "";
            Object localObject3 = null;
            Vector localVector = null;
            Object localObject4 = ((JSONObject) localObject1).keys();
            while (((Iterator) localObject4).hasNext()) {
                localObject2 = (String) ((Iterator) localObject4).next();
                localObject3 = ((JSONObject) localObject1).getJSONArray((String) localObject2);
                if (localObject3 == null)
                    continue;
                localObject5 = null;
                localObject6 = null;
                localVector = new Vector();
                for (j = 0; j < ((JSONArray) localObject3).length(); ++j) {
                    localObject5 = (JSONObject) ((JSONArray) localObject3).opt(j);
                    localObject6 = new p();
                    if (!(((JSONObject) localObject5).isNull("name")))
                        ((p) localObject6).a = ((JSONObject) localObject5).getString("name");
                    if (!(((JSONObject) localObject5).isNull("number")))
                        ((p) localObject6).c = ((JSONObject) localObject5).getInt("number");
                    if (!(((JSONObject) localObject5).isNull("coin")))
                        ((p) localObject6).e = ((JSONObject) localObject5).getInt("coin");
                    if (!(((JSONObject) localObject5).isNull("type")))
                        ((p) localObject6).b = ((JSONObject) localObject5).getString("type");
                    if (!(((JSONObject) localObject5).isNull("coinType")))
                        ((p) localObject6).d = ((JSONObject) localObject5).getString("coinType");
                    if (!(((JSONObject) localObject5).isNull("ts")))
                        ((p) localObject6).f = ((JSONObject) localObject5).getLong("ts");
                    if (!(((JSONObject) localObject5).isNull("level")))
                        ((p) localObject6).g = ((JSONObject) localObject5).getString("level");
                    localVector.add(localObject6);
                }
                this.g.put(localObject2, localVector);
            }
        } catch (Exception localException) {
            x.a(h, localException);
        } catch (Error localError) {
            x.a(h, localError);
        }
    }
}